package my.program.hellolinear;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class HelloLinearActivity extends Activity implements OnClickListener {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        final Button button = (Button) findViewById(R.id.form_button);
        button.setOnClickListener(this);
    }
    public void onClick(View v) {

        switch ( v.getId() ) {
            case R.id.form_button:
            final EditText edit_name = (EditText)findViewById(R.id.edit_name);
            final EditText edit_lastname = (EditText)findViewById(R.id.edit_lastname);
            Bundle bundle = new Bundle();
            bundle.putString("name", edit_name.getText().toString());
            bundle.putString("lastname", edit_lastname.getText().toString());
            Intent form_intent = new Intent(getApplicationContext(), Form.class);
            form_intent.putExtras(bundle);
            startActivity(form_intent);
            break;
        }
    }
}

	